package com.imooc.mapper;


import com.imooc.entity.bo.CommentBo;
import com.imooc.entity.pojo.Comment;
import com.imooc.entity.vo.CommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentMapper {
    /**
     * 提交新的评论
     * @param comment
     * @return
     */
    public void createComment(Comment comment);
    public List<CommentVo> getCommentList(String vlogId,String userId);

    /**
     * 删除该评论
     * @param commentUserId
     * @param commentId
     * @param vlogId
     */
    void delThisCount(String commentUserId, String commentId, String vlogId);
    @Select("select * from comment where id = #{commentId}")
    Comment getCommentById(String commentId);

}